<template>
  <td>
    {{sum}}
  </td>
</template>

<script>
export default {
  data() {
    return{
      arr:[0]
    }
  },
  props:['list'],
  computed:{
    sum(){
      this.list.forEach(item=>{
        item.checked?this.arr.push(item.price*item.num):''
      })
        return this.arr.reduce((pre,item)=>pre+item)
    }
  }
}
</script>

<style>

</style>